package com.cl.base.auth.service;

import com.cl.base.auth.dto.PayloadDto;
import com.cl.base.auth.entity.AuthUser;
import org.springframework.security.core.userdetails.UserDetails;

import javax.servlet.http.HttpServletRequest;

public interface JwtTokenService {
    String getToken(HttpServletRequest request);

    String generateTokenByHMAC(String payloadStr, String secret);

    String generateTokenByHMAC(String payloadStr);

    PayloadDto getPayloadDtoByHMAC(String token, String secret);

    PayloadDto getPayloadDtoByHMAC(String token);

    PayloadDto createPayloadDto(AuthUser authUser);

    boolean validateToken(PayloadDto payloadDto, UserDetails userDetails);
}
